package com.oig.sys.base.entity;

import com.oig.common.constants.CommonEnum;
import com.oig.sys.base.constants.SysBaseEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;


/**
 * @author wuxl
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_customs")
public class TbCustoms implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 * 批文需求原入境地的作用还成 海关编码
	 */
	@Column(name = "customs_code", nullable = false, length = 32)
	private String customsCode;

	/**
	 */
	@Column(name = "customs_name", length = 64)
	private String customsName;

	/**
	 */
	@Column(name = "country_code", length = 6)
	private String countryCode;
	@Column(name = "country_name", length = 128)
	private String countryName;

	/**
	 * SAP维护的国家编码, 做冗余
	 */
	@Column(name = "country_apply_code", length = 6)
	private String countryApplyCode;

	/**
	 */
	@Column(name = "city_code", length = 6)
	private String cityCode;
	@Column(name = "city_name", length = 128)
	private String cityName;


	@Column(name = "status", length = 2)
	private String status;

	/**
	 */
	@Column(name = "sort")
	private Integer sort;

	@Column(name = "old_code")
	private String oldCode;


	// 单证申请-特殊处理标识 盐田登记证限4行明细
	@Column(name = "special_apply_flag")
	private String specialApplyFlag;


	/**
	 * 检疫证要求
	 */
	@Column(name = "quarantine_requirement")
	@Enumerated(EnumType.STRING)
	private SysBaseEnum.QuarantineRequirement quarantineRequirement;

	/**
	 * 删单重报是否重算税费
	 */
	@Column(name = "recount_tax")
	@Enumerated(EnumType.ORDINAL)
	private CommonEnum.FlagEnum recountTax;

	/**
	 * 境外发货人类型
	 */
	@Column(name = "overseas_sender_type")
	@Enumerated(EnumType.STRING)
	private SysBaseEnum.OverseasSenderType overseasSenderType;


	/**
	 * 默认境内目的地代码
	 */
	@Column(name = "inner_address_code")
	private String innerAddressCode;
	@Column(name = "inner_address_name")
	private String innerAddressName;
	/**
	 * 默认目的地地区代码
	 */
	@Column(name = "inner_area_code")
	private String innerAreaCode;
	@Column(name = "inner_area_name")
	private String innerAreaName;

	/**
	 * 港口代码
	 * */
	@Column(name = "port_code")
	private String portCode;

	/**
	 * 港口名称
	 * */
	@Column(name = "port_name")
	private String portName;
}
